<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateVassetisTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::dropIfExists('vassetis');
        Schema::create('vassetis', function (Blueprint $table) {

            $table->increments('id');
            // 服务商ID
            $table->integer('sp_id')->unsigned()->index()->nullable();
            // 媒资id
            $table->integer('vasseti_id')->unsigned()->index();
            // 标题
            $table->string('title', 100)->nullable();
            // 副标题
            $table->string('subtitle', 100)->nullable();
            // 评分
            $table->decimal('score', 10, 3)->nullable();
            // 集数,数字
            $table->integer('episode')->nullable();
            // 描述
            $table->text('short_desc')->nullable();
            // 详情
            $table->text('long_desc')->nullable();
            // 分类
            $table->text('tags')->nullable();
            // 导演
            $table->text('directors')->nullable();
            // 演员
            $table->text('actors')->nullable();
            // 翻译 暂时和导演数据一样
            $table->text('translators')->nullable();

            // 图片-剧照
            $table->text('imgs')->nullable();
            // 海报
            $table->text('posters')->nullable();

            // 流
            $table->text('streams')->nullable();
            // 文件
            $table->text('vifiles')->nullable();

            // // 推荐位id
            // $table->integer('recommend_id')->unsigned()->index()->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('vassetis');
    }
}
